package com.ncbee.base.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author youdianyun
 * @since 2018-11-23
 */
@TableName("s_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 所属部门
     */
    @TableField(strategy = FieldStrategy.IGNORED)
    private Long deptId;

    /**
     * 头像地址
     */
    private String imageUrl;

    /**
     * 邮件
     */
    private String email;

    /**
     * 真实名称
     */
    private String realName;

    /**
     * 省份证号
     */
    private String idCard;

    /**
     * 1:男 0:女
     */
    private Integer sex;

    /**
     * 生日
     */
    private LocalDate birthdate;

    /**
     * 注册时间
     */
    private LocalDateTime registerTime;

    /**
     * 微信opendId
     */
    private String wxOpenId;

    /**
     * 手机号
     */
    private String mobileNum;

    /**
     * 状态:1:有效 0:禁用
     */
    private Integer status;

    /**
     * 盐:用户二次散列
     */
    private String salt;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }


    public LocalDateTime getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(LocalDateTime registerTime) {
        this.registerTime = registerTime;
    }

    public String getWxOpenId() {
        return wxOpenId;
    }

    public void setWxOpenId(String wxOpenId) {
        this.wxOpenId = wxOpenId;
    }

    public String getMobileNum() {
        return mobileNum;
    }

    public void setMobileNum(String mobileNum) {
        this.mobileNum = mobileNum;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public LocalDate getBirthdate() {
        return birthdate;
    }

    public void setBirthdate(LocalDate birthdate) {
        this.birthdate = birthdate;
    }

    @Override
    public String toString() {
        return "User{" +
        "id=" + id +
        ", username=" + username +
        ", password=" + password +
        ", deptId=" + deptId +
        ", imageUrl=" + imageUrl +
        ", email=" + email +
        ", realName=" + realName +
        ", idCard=" + idCard +
        ", sex=" + sex +
        ", birthdate=" + birthdate +
        ", registerTime=" + registerTime +
        ", wxOpenId=" + wxOpenId +
        ", mobileNum=" + mobileNum +
        ", status=" + status +
        ", salt=" + salt +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
